<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pm="http://primefaces.org/mobile" contentType="text/html"
	renderKitId="PRIMEFACES_MOBILE">

	<pm:page title="Contacts">
		<!-- Main View -->
		<pm:view id="main">
			<h:form id="processoForm">
				<pm:header title="Advogado PE">
					<f:facet name="right">
						<p:commandButton value="Consultar Processo" icon="plus"
							action="#{processoView.novaConsulta}"
							update=":consultarProcessoForm" />
					</f:facet>
				</pm:header>

				<pm:content>
					<h4>Dados do Processo</h4>
					<h:panelGrid columns="2" rendered="#{processoView.processoJudicial != null}">
						<h:panelGroup>
						<b>
						<h:outputText value="OrgaoJulgador" /> :
						</b>
						</h:panelGroup>
						<h:outputText value="#{processoView.processoJudicial.dadosBasicos.codigoOrgaoJulgador}" />
						<b>
						<h:outputText value="classeProcessual" /> :
						</b>
						<h:outputText value="#{processoView.processoJudicial.dadosBasicos.classeProcessual}" />
						<b>
						<h:outputText value="numero" /> :
						</b>
						<h:outputText value="#{processoView.processoJudicial.dadosBasicos.numero.value}" />
					</h:panelGrid>
					<h:outputText value="Assunto(s)" rendered="#{processoView.processoJudicial != null}"/>
					<p:dataList id="assuntos" value="#{processoView.processoJudicial.dadosBasicos.assunto}"
						var="assunto" rendered="#{processoView.processoJudicial != null}">
						<p:column>
							<f:facet name="header">
								<h:outputText value="codigoNacional" />
							</f:facet>
							<h:outputText value="#{assunto.codigoNacional}" />
						</p:column>
						<p:column headerText="isPrincipal">
							<f:facet name="header">
								<h:outputText value="isPrincipal" />
							</f:facet>
							<h:outputText value="#{assunto.principal}" />
						</p:column>
					</p:dataList>
				</pm:content>
			</h:form>
		</pm:view>

		<!-- New Contact -->
		<pm:view id="new">
			<pm:header title="Consultar Processo">
				<f:facet name="left">
					<p:button value="Voltar" icon="back" href="#main?reverse=true" />
				</f:facet>
			</pm:header>
			<pm:content>
				<h:form id="consultarProcessoForm">
					<p:inputText id="npu" value="#{processoView.npu}"
						label="NPU:" />
					<p:commandButton value="Consultar" action="#{processoView.consultar}"
						update=":processoForm" icon="check" />
				</h:form>
			</pm:content>
		</pm:view>
	</pm:page>
</f:view>